<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<section>
    <h4>面试知识点</h4>
    <ul>
        <li>常见的状态码</li>
        <li>无状态和无连接，短连接和长连接</li>
        <li>keep-alive</li>
        <li>涉及缓存的属性有哪些</li>
    </ul>
</section>
<section>
    <h4>响应头参数</h4>
    <ul>
        <li>httponly - 禁用客户端改写cookie</li>
    </ul>
</section>
<section>
    <h4>请求头参数</h4>
    <ul>
        <li>cookie - 发送请求是自动携带</li>
        <li>referer - 防盗链 或 防止csrf(一般不用这个)</li>
        <li>origin - 查看请求来源</li>
        <li>host - 请求的地址</li>
    </ul>
</section>
<section>
    <ol>
        <li>三次握手过程</li>
        <li>seq：序列号32位</li>
        <li>ack：确认序列号32位</li>
        <li>ACK：确认标志位</li>
        <li>SYN：新开连接</li>
        <li>FIN：结束连接</li>
        <li>client：seq = x，SYN = 1</li>
        <li>server：seq = y，SYN = 1, ack = x + 1, ACK = 1（客户端能确定服务端能收到信息）</li>
        <li>client：seq = x + 1, ack = y + 1, ACK = 1（服务端能确定客户端收到信息）</li>
    </ol>
    <ol>
        <li>四次挥手过程</li>
        <li>client：seq = u，FIN = 1（客户端请求断开）</li>
        <li>server：seq = v，ack = u + 1，ACK = 1（服务端同意断开，等我把消息发完）</li>
        <li>server：seq = w，ack = u + 1，FIN = 1，ACK = 1（服务端把消息发完，断开）</li>
        <li>client：seq = u + 1，ack = w + 1，ACK = 1（客户端，断开）</li>
    </ol>
</section>
</body>
</html>
seq = x SYN = 1
seq = y SYN = 1 ack = x + 1 ACK = 1
seq = x + 1 ack = y + 1 ACK = 1

seq = u FIN = 1
seq = v ack = u + 1 ACK = 1
seq = w FIN = 1 ack = u + 1 ACK = 1
seq = u + 1 ack = w + 1 ACK = 1
